package com.black.platform.area.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.black.platform.area.mapper.AreaMapper;
import com.black.platform.area.po.Area;
import com.black.platform.area.service.AreaService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author linwenfeng
 */
@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService {

    @Override
    public List<Area> listByPid(Long parentId) {
        return this.baseMapper.selectList(new LambdaQueryWrapper<Area>().eq(Area::getParentId, parentId));
    }
}
